package com.example.mq.common.mode;

import lombok.Data;

/*
 * 表示一个消费者(完整的执行环境)
 */
@Data  
public class ConsumerEnv {

    // 消费者标签
    private String consumerTag;

    // 队列名称
    private String queueName;

    // 是否自动确认消息
    private boolean autoAck;

    // 处理收到消息的回调
    private Consumer consumer;

    // 构造函数，用于初始化 ConsumerEnv 对象
    public ConsumerEnv(String consumerTag, String queueName, boolean autoAck, Consumer consumer) {
        this.consumerTag = consumerTag;
        this.queueName = queueName;
        this.autoAck = autoAck;
        this.consumer = consumer;
    }
}
